/** 
 * 设置列 
 *  
 * @return 
 */  
function getColumns() {  
    return [[  
             {field:'id', title:"编号", checkbox:true},  
             {field:'userName', title:"用户名", halign:'center', align:'center',sortable:true, width:278},  
             {field:'password', title:"密码", halign:'center', align:'center', sortable:true, width:278},  
             {field:'sex', title:"性别", halign:'center', align:'center',sortable:true, width:278},  
            /* {field:'address', title:"状态", halign:'center', align:'center',sortable:true, width:80, 
                formatter: function(value,row,index){ 
                    return taskState.get(value); 
                } 
             },  */
             {field:'attribute', title:"身份信息", halign:'center', align:'center',sortable:true, width:200},

             ]];  
}  
  
  
/** 
 * 初始化页面 
 */  
jQuery(function() {  
    var gridParam = {  
            rownumbers:true,  
            loadMsg : "数据加载中",  
            pagination : true,  
            multiSort : true,  
            pageSize :  10,  
            pageList : [ 5, 10, 20, 50, 100 ],  
            striped : true,  
            columns : getColumns(),  
            //queryParams : queryParams,  
            url:basePath+"/user/searchUser.do",  
            collapsible : true,  
            singleSelect : true,  
            idField : "id" // 支持跨页选择  
        };  
          
        $('#userInfo').datagrid(gridParam);  
        $('#userInfo').datagrid("getPager").pagination( {  
            pageSize : 10,  
            displayMsg : '当前数据范围 {from} 到 {to} ，共 {total} 条记录',  
            beforePageText : '当前',  
            afterPageText : '  ,共 {pages}页'  
        });  
});  